import Vue from 'vue'
import Router from 'vue-router'
import Index from '@/components/index/index'
import User  from  '@/components/user/user'
import Login from  '@/components/user/login'
import Register from "@/components/user/register"
import forgetPassword  from "@/components/user/forgetPassword"
import Contents from  '@/components/index/content';
import Barcode from '@/components/index/barcode';
import Accredit from '@/components/index/accredit';
import Collect from  '@/components/collect/collect';
import Message from '@/components/message/message'
import Article from '@/components/article/article'
import UserEdit from '@/components/user/userEdit'
import Activity from '@/components/user/activity'
import Fans     from  '@/components/user/fans'
import Focus    from  '@/components/user/focus'
import Info    from  '@/components/message/info'

Vue.use(Router)
export default new Router({
    // mode:'history',
    routes: [
        {
            path: '/index',
            name: 'index',
            component: Index
        },
        {
            path: '/content',
            name:'/content',
            component:Contents
        },
        {
            path:'/user',
            name:'user',
            component:User,
        },
        {
            path:'/userEdit',
            name:'userEdit',
            component:UserEdit,
        },
        {
            path:'/activity',
            name:'activity',
            component:Activity,
        },
        {
            path:'/fans',
            name:'fans',
            component:Fans,
        },
        {
            path:'/focus',
            name:'focus',
            component:Focus,
        },
        {
            path:'/login',
            name:'login',
            component:Login,
        },
        {
            path:'/register',
            name:'register',
            component:Register,
        },
        {
            path:'/forgetPassword',
            name:'forgetPassword',
            component:forgetPassword,
        },
        {
            path:'/barcode',
            name:'barcode',
            component:Barcode,
        },{
            path:'/accredit',
            name:'accredit',
            component:Accredit,
        },
        {
            path:'/collect',
            name:'collect',
            component:Collect,
        },
        {
            path:'/message',
            name:'message',
            component:Message,
        },
        {
            path:'/info',
            name:'info',
            component:Info,
        },
        {
            path:'/article',
            name:'article',
            component:Article,
        },
        {
            path:'/',
            redirect: '/index'
        },
        {
            path:'*',
            redirect: '/index'
        },
    ]

})

